﻿using System.ServiceModel;
using System.ServiceModel.Web;

namespace MusicPlow
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IMusicPlowRESTApi" in both code and config file together.
    [ServiceContract]
    public interface IMusicPlowRESTApi
    {
        [OperationContract]
        [WebInvoke(Method="GET",
            ResponseFormat = WebMessageFormat.Json,
            BodyStyle = WebMessageBodyStyle.Bare,
            UriTemplate = "fromfreetext/{text}/{amount=5}")]
        SearchResults FromFreeText(string text, string amount);

        [OperationContract]
        [WebInvoke(Method = "GET",
            ResponseFormat = WebMessageFormat.Json,
            BodyStyle = WebMessageBodyStyle.Bare,
            UriTemplate = "fromytvideo/{videoid}/{amount=5}")]
        SearchResults FromYoutubeVideo(string videoid, string amount);
    }
}
